home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / pasfile.arc / FILES.DOC < prev    next >
Text File  |  1989-03-19  |  3KB  |  87 lines

  1. NAME
  2.  
  3.   Files -- a flexible file/directory listing tool.
  4.  
  5. USAGE
  6.  
  7.   FILES [pathname] [-F|D] [-S] [-X string]
  8.  
  9. DESCRIPTION
  10.  
  11.   FILES with no arguments will list all the files (including directories and
  12.   hidden and system files) in the current directory.  Each file will be listed
  13.   in the following (default) format:
  14.  
  15.         <filename> <date> <time> <attributes> <size> <volume>
  16.  
  17.   The "pathname" argument can be a full MSDOS path with a wildcarded file name.
  18.   If no pathname is given the default is "*.*".
  19.  
  20.   The "-F" or "-D" switches control the types of files found.  With the "-F"
  21.   option only files (no directories) will be listed.  With the "-D" option only
  22.   the files and directories that would be found with the MSDOS DIR command will
  23.   be listed (no system or hidden files).
  24.  
  25.   The "-S" option specifies that all subdirectories below the given path should
  26.   also be searched for files matching the specified filename.
  27.  
  28.   The "-X" option is followed by a string that will be expanded for each file
  29.   found.  The string may contain special character combinations that will be
  30.   expanded, similar to the MSDOS PROMPT command.  The special character
  31.   combinations consist of a dollar sign ($) followed by one of the following
  32.   characters:
  33.  
  34.         $ - the '$' character
  35.         t - the time the file was last written
  36.         d - the date the file was last written
  37.         p - the path to the directory the file is in
  38.         g - the '>' character
  39.         l - the '<' character
  40.         b - the '|' character
  41.         f - the file name
  42.         a - the file attribute
  43.         0 - the low word of the file size (in hex)
  44.         1 - the high word of the file size (in hex)
  45.         k - the file size (in Kbytes)
  46.         v - the volume label
  47.  
  48.   The default string is '$f $d $t $a $k $v $p'.
  49.  
  50.   The file attribute field consists of six characters, one character for each
  51.   attribute.  If an attribute is reset then it is represented by a dash (-).
  52.   The attributes that are set are represented by:
  53.  
  54.         r - read only
  55.         h - hidden
  56.         s - system
  57.         v - volume label
  58.         d - directory
  59.         a - archive
  60.  
  61.  
  62. EXAMPLES
  63.  
  64.   > FILES
  65.         -- will list all entrys in the current directory
  66.  
  67.   > FILES /bin/src/*.pas
  68.         -- will list all files in the directory "/bin/src" with the extension
  69.         -- ".pas"
  70.  
  71.   > FILES /bin/*.p -s
  72.         -- will list all files with the ".p" extension in "/bin" or any
  73.         -- directory below "/bin"
  74.  
  75.   > FILES c:/*.bak -s -x del $p$f >delbaks.bat
  76.         -- will list all files with the ".bak" extension in any directory on
  77.         -- disk "c:" and produce a string of the form "del <path><file>" of
  78.         -- every file found.  The output is redirected into the file
  79.         -- "delbaks.bat".  (The batch file could be used to delete all .BAK
  80.         -- files on the disk).
  81.  
  82.   > FILES *.def -x .include $f | sort | pp >prn
  83.         -- will produce a list of ".include" commands that is sorted and passed
  84.         -- to a print utility which interprets the commands and writes the
  85.         -- resulting file to the printer.  The net result is a formatted listing
  86.         -- of the contents of all the .DEF files in alphabetical order.
  87.